package com.zhang.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhang.gulimall.common.utils.PageUtils;
import com.zhang.gulimall.product.entity.AttrEntity;
import com.zhang.gulimall.product.entity.AttrGroupEntity;
import com.zhang.gulimall.product.vo.AttrGroupVo;
import com.zhang.gulimall.product.vo.AttrVo;
import com.zhang.gulimall.product.vo.SkuItemVo;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author zhang
 * @email sunlightcs@gmail.com
 * @date 2022-09-14 10:23:17
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPage(Map<String, Object> params, String catId);

    List<AttrEntity> queryRelationPage(Map<String, Object> params, String groupId);

    List<AttrEntity> queryNoRelationPage(Map<String, Object> params, String groupId);

    void saveRelations(List<AttrVo> attrVos);

    void removeRelation(List<AttrVo> attrVos);

    List<AttrGroupVo> groupWithAttrList(Map<String, Object> params, String catelogId);

    List<SkuItemVo.SpuItemAttrGroup> getAttrGroupWithAttrsBySpuId(String spuId, String catalogId);
}

